home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
- #include <graphics.h>
-
- main()
- {
- int graphdriver = DETECT, graphmode, errorcode;
- /* Generate an error by calling initgraph with
- * wrong pathname for device drivers
- */
- initgraph(&graphdriver, &graphmode, "c:\\");
- errorcode = graphresult();
- if(errorcode != 0)
- {
- printf("Graphics error!");
- printf("Error code is %d\n", errorcode);
- }
- else
- printf("No error detected\n");
- }